/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package competition.business;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 *
 * @author Administrateur
 */
@Entity
public class Sport extends AbstractEvent implements Serializable { 
    protected final String eventType = "Sport";
    protected int strength;

    public Sport() {
    }

    public Sport(String name, int timeSpan, int force) {
        this.name = name;
        this.timeSpan = timeSpan;
        this.strength = force;
    }

    public int getStrength() {
        return strength;
    }
    public void setStrength(int force) {
        this.strength = force;
    }

    @Override
    public String GetType() {
        return eventType;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Sport)) {
            return false;
        }
        Sport other = (Sport) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "competition.Sport[id=" + id + "]";
    }
}
